<?php $search = \application\Comm\Request::postParam('search');
use application\Comm\Func;
 ?>
 <link rel="stylesheet" href="<?php echo Func::staticUrl('css/housedetail.css?v=20160505') ?>">
<script type="text/javascript" src="<?php echo Func::staticUrl('js/scroll.js') ?>"></script>
<script type="text/javascript" src="<?php echo Func::staticUrl('js/jquery.mousewheel.js') ?>"></script>
<!--头部-->
<!--列表页内容-->
<style>
.show_tag{position:absolute;bottom:40px;right:30px;width: 460px;height: 240px;overflow: hidden;}
.tag{position:relative;margin-top:24px;width: 460px;height: 215px;background: #ffffff;}
.tag .patternmaking{float: right;position:relative;margin-right:23px;top:-23px;width: 119px;height: 119px;}
.tag .patternmaking img{border: 3px solid #ffffff;width: 119px;height: 119px;}
.tag h3{width:315px;height: 65px;line-height: 90px;text-align: center;color: #1a1a1a;font-family: '宋体';font-size: 23px;overflow: hidden;}
.tag p{padding: 0 30px;height: 140px;vertical-align: bottom;color: #666666;line-height: 23px;text-indent: 12px;}
</style>
<div class="house_detail">
    <div class="house_process wrap">
        <img src="<?= Func::staticUrl('images/house/house_detail.jpg') ?>">
    </div>
    <div class="house_show">
        <div class="house_list wrap">
            <div class="nav_link">
                <a href="<?php echo Func::createUrl('site/index')?>">首页</a>
                >
                <a href="<?php echo Func::createUrl('house/index')?>">全屋定制</a>
             	 >
                <a href="<?php echo Func::createUrl('house/index')?>"><?php echo $name['name']?></a>
            </div>
        </div>
        <div class="house_box wrap">
            <div class="house_box_l">
                <div class="tit">
                    <img src="<?php echo Func::staticUrl('images/house/logo.jpg')?>">
                </div>
                <a class="pre btn"></a>
                <div class="list_box">
                    <ul class="list">
                    <?php if (isset($houses)){?>
                    <?php foreach ($houses as $key=>$val){?>
                        <li <?php if ($key ==0) echo 'class="act"'?>>
                            <img src="<?php echo Func::imgUrl($val['view_src'])?>">
                            <div class="defaults"></div>
                            <div class="moving">
                                <div class="bg"></div>
                                <div class="lace">
                                    <span><?php echo $val['space_id']?></span>
                                </div>
                            </div>
                            <div class="click_">
                                <span><?php echo $val['space_id']?></span>
                            </div>
                        </li>
                       <?php }}?>
                    </ul>
                </div>
                <a class="next btn"></a>
            </div>
            <div class="house_box_r">
                <ul class="pic_showing">
                 <?php if (isset($houses)){?>
                    <?php foreach ($houses as $key=>$val){?>
                    <li>
                        <a href="<?php echo $val['product_id']?>">
                            <img src="<?php echo Func::imgUrl($val['view_src'])?>">
                        </a>
                    </li>
                   <?php }}?>
                </ul>
                <!-- 暂时注销户型说明 -->
                <!-- <div class="show_tag">
                    <div class="tag">
                        <div class="patternmaking">
                            <img src="<?= $name['unit_src'];?>">
                        </div>
                        <h3><?= $name['name'].$name['type_id']; ?></h3>
                        <p>
                        <?= $name['description']; ?>
                        </p>
                    </div>
                </div> -->
            </div>
        </div>
    </div>
</div>
<!--公共尾部-->
</body>
</html>
<script type="text/javascript">
    $(function(){
        var i=0;
        var li_hight=$('.list li').height();
        var num_= $('.list li').length;
        $('.list li').click(function(){
            $(this).addClass('act').siblings().removeClass('act');
            $('.pic_showing li').eq($(this).index()).show().siblings().hide();
        })
        $('.next').click(function(){
            go_next(i);
        })
        function go_next(i) {
            i++;
            if(i>=num_-5){
                i=num_-3;
            }
            tab(i);
        }
        $('.pre').click(function(){
            go_prev(i);
        })
        function go_prev(i) {
            i--;
            if(i<0){
                i=0;
            }
            tab(i);
        }
        function tab(i){
            $('.list').stop(true).animate({'top':-i*li_hight});
        }
        /*鼠标滚轮代码*/
        var loghandle = function(event, delta) {
            if (delta > 0){
                go_prev(i);
            }else if(delta < 0){
                go_next(i);
            }
        };

        $('.list').mousewheel(function(event, delta) {
            loghandle(event, delta);
            return false; // prevent default
        });
    })
</script>